﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CheckOut.aspx.vb" Inherits="CheckOut" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <!-- BEGIN content -->
	<div id="content"> 

              <!--  begin recommendation -->
		    <div class="featured">
		
            <h2>Personal Information 

            </h2>
                <asp:LoginView ID="LoginView1" runat="server">
               
                <AnonymousTemplate>
                 
                    <asp:Login ID="Login1" runat="server">
                    </asp:Login>
               
                 <b>
                   <asp:HyperLink ID="HyperLink1" NavigateUrl="Register.aspx" 
                   runat="server">Creat New Account</asp:HyperLink>                
                 </b>

              
                </AnonymousTemplate>

                <LoggedInTemplate>
                
               <table cellspacing="10px" >
              
                <tr style="margin-bottom:10px;" >
            
                <td ><b> First Name: </b</td>
                 <td> <asp:TextBox ID="txtFName" runat="server" Width="250px"></asp:TextBox>     </td> 
                </tr>
            
                 <tr>
                <td><b>Last Name: </b></td>
                 <td>   <asp:TextBox ID="txtLastName" runat="server" Width="250px"></asp:TextBox>    </td>
                  <td></td>
                </tr>

               <tr>
            
                <td><b>Card Number: </b></td>
                 <td>   <asp:TextBox ID="txtCardNo" runat="server" Width="250px"></asp:TextBox> </td>
                  <td></td>
               </tr>

                 <tr>
                <td  >  
                  </td>
                 
                 <td rowspan="2" align="right" style=" width:230px" >
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> 
                    <asp:Button ID="btnOrder" runat="server" Text="Order" OnClick="btnOrder_Click" />
                 </td>
               </tr>

            </table>
        
                </LoggedInTemplate>
                </asp:LoginView>
           
          <asp:Label ID="lblOrderFeedBack" runat="server"  Font-Bold="false" ></asp:Label>

            </div>
		 <!-- end recommendation-->

    </div>

</asp:Content>


<asp:Content ID="Content3" ContentPlaceHolderID="SidebarContent" Runat="Server">

       	<!-- BEGIN sidebar -->
	    <div id="sidebar">
        		    <div class="box">
		    <h2>    
                <asp:Label ID="lblCartHeader" runat="server" Text="Shopping Cart"></asp:Label></h2>
             <br />
               <asp:GridView ID="gvwOrderedParts" runat="server" AutoGenerateColumns="False" 
            Width="100%" DataKeyNames="PartID" CellPadding="4" ForeColor="#333333" 
                    GridLines="None" >
                           <AlternatingRowStyle BackColor="White" />
               <Columns>
                
                  <asp:TemplateField HeaderText="Part(s)" HeaderStyle-HorizontalAlign="Left">
                     <ItemTemplate>
                         <asp:Label ID="lblPart" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                     </ItemTemplate>
                      <HeaderStyle HorizontalAlign="Left" />
                  </asp:TemplateField>


                  <asp:TemplateField HeaderText="Price" HeaderStyle-HorizontalAlign="Left">
                     <ItemTemplate>
                        <div style="text-align: Left">
                           <%# FormatPrice(Eval("UnitPrice")) %>
                        </div>
                     </ItemTemplate>
                      <HeaderStyle HorizontalAlign="Left" />
                  </asp:TemplateField>


                  <asp:TemplateField HeaderText="Qty"  HeaderStyle-HorizontalAlign="Left">
                     <ItemTemplate>
                        <div style="text-align: Left;">                            
                            <asp:Label ID="lblQuantity" runat="server" Width="30px" Text='<%# Eval("Quantity") %>'></asp:Label>
                        </div>
                     </ItemTemplate>
                     <ItemStyle Width="60px" />
                  </asp:TemplateField> 

               </Columns>
              
               <EmptyDataTemplate><b></b></EmptyDataTemplate>   
                           <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                           <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                           <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                           <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                           <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                           <SortedAscendingCellStyle BackColor="#FDF5AC" />
                           <SortedAscendingHeaderStyle BackColor="#4D0000" />
                           <SortedDescendingCellStyle BackColor="#FCF6C0" />
                           <SortedDescendingHeaderStyle BackColor="#820000" />
            </asp:GridView>
		    
            <br />

               <asp:Panel runat="server" ID="panTotals">
            <div style="text-align: right; font-weight: bold; padding-top: 4px;">
           
             <p>  Subtotal: <asp:Literal runat="server" ID="lblSubtotal" />  </p> 
               <br />
              
               <p>  Shipping: <asp:Literal runat="server" ID="lblShippingCost" />  </p> 
               <br />
               <p>
               <u>Total:</u> <asp:Literal runat="server" ID="lblTotal" />
               </p>
                <br />
                
              <small>   
                     <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Default.aspx"> << Continue shopping</asp:HyperLink> 
                       &nbsp; &nbsp;             
                     <a onclick="goBack()" href="#" > << Go Back to Previous Page  </a>
              
               </small>              
               <br />
                <br />
            </div>
            </asp:Panel>
           
            </div>
        </div>
	<!-- END sidebar -->

<script type="text/javascript">
    function goBack() {
        window.history.back()
    }
</script>

</asp:Content>

